<template>
	<view class="wrap">
		<view class="head_box">
			<view class="head_left">
				<view class="head_left_icon">
					<image :src="retData.info.data_image" mode="aspectFill"></image>
				</view>
				<view class="head_left_info">
					<view class="head_left_info_title line2">
						{{retData.info.name}}
					</view>
					<view class="head_left_info_text line1">
						{{retData.info.corporate}}
					</view>
					<view class="head_left_info_count line1">
						规格：{{retData.info.data_specs}}
					</view>
				</view>
			</view>
			<view class="head_right"
				v-if="retData.item_list && retData.item_list.length && retData.info.grade || !typeMain && retData.info.grade">
				<view class="head_right_rank">
					<view class="head_right_rank_spot"
						:class="retData.info.grade=='B'?'b_bg':retData.info.grade=='C'?'c_bg':retData.info.grade=='D'?'d_bg':retData.info.grade=='B-'?'b1_bg':''">
						<image src="/static/images/details-5.png"></image>
					</view>
					<view class="head_right_rank_text"
						:class="retData.info.grade=='B'?'b_color':retData.info.grade=='C'?'c_color':retData.info.grade=='D'?'d_color':retData.info.grade=='B-'?'b1_color':''"
						:style="retData.info.grade=='B-'?'font-size:56rpx;margin-top:10rpx':'font-size:70rpx'">
						{{retData.info.grade?retData.info.grade+'级':''}}
					</view>
				</view>
			</view>
			<view class="head_right" v-else>
				<view class="head_right_rank">
				</view>
			</view>
		</view>
		<block v-if="typeMain">
			<view class="additive-box">
				<view class="title-d">
					<image src="/static/images/ret-1.png" mode="widthFix"></image>
					<view class="i"></view>
					<view class="name">添加剂</view>
				</view>
				<view class="list-d">
					<block
						v-if="retData.item_list && retData.item_list.length && retData.info.is_scan && retData.info.is_scan_nutrition">
						<view class="list" v-for="(item,index) in retData.item_list" :key="index">
							<view class="tit">
								<view class="i"
									:class="item.grade=='B'?'b_bg':item.grade=='C'?'c_bg':item.grade=='D'?'d_bg':item.grade=='B-'?'b1_bg':''">
								</view>
								<text style="width: 80rpx;display: inline-block;vertical-align: top;">
									{{item.grade}}级
								</text>
								<view class="span" v-if="item.grade =='A'">{{item.name}}</view>
								<view class="span b_border b_color" v-if="item.grade =='B'">{{item.name}}</view>
								<view class="span b1_border b1_color" v-if="item.grade =='B-'">{{item.name}}</view>
								<view class="span c_border c_color" v-if="item.grade =='C'">{{item.name}}</view>
								<view class="span d_border d_color" v-if="item.grade =='D'">{{item.name}}</view>
							</view>
							<view class="li-d">
								<view class="li" @click="itemListFun(index)">
									<view class="i"
										:class="item.grade=='B'?'b_bg':item.grade=='C'?'c_bg':item.grade=='D'?'d_bg':item.grade=='B-'?'b1_bg':''">
									</view>
									<view class="name">
										{{item.item.length}}个
									</view>
									<view class="img1" :style="item.main?'transform: rotate(270deg);':''">
										<image src="/static/images/my7.png"></image>
									</view>
								</view>
								<block v-if="item.main">
									<view class="li" v-for="(items,indexs) in item.item" :key="indexs">
										<view class="i"
											:class="item.grade=='B'?'b_bg':item.grade=='C'?'c_bg':item.grade=='D'?'d_bg':item.grade=='B-'?'b1_bg':''">
										</view>
										<view class="name"
											style="color: #669ddb;border-bottom: solid 1rpx #669ddb; display: inline-block;vertical-align: top;width:auto;line-height: 40rpx;margin: 6rpx 0;">
											{{items.name}}
										</view>
										<!-- <view class="type" v-if="items.label_list && items.label_list.length">
											<text v-for="(itemss,indexss) in items.label_list" :key="indexss">{{itemss}}</text>
										</view> -->
										<view class="img">
											<image src="/static/images/13.png"></image>
										</view>
									</view>
								</block>

							</view>

						</view>
						<view class="content-ramk" v-if="!retData.info.is_locked">
							<view style="color: #f36464;">以上为AI识别，暂未经过人工核对</view>
							<view style="color: #f36464;">仅供参考</view>
						</view>
					</block>
					<block v-else>
						<view class="content" v-if="!retData.item_list.length">
							<view class="content-ramk" style="font-size: 32rpx;padding: 30rpx 0;">暂无添加剂数据</view>
							<!-- <view class="content_btn" @click="chooseImage">
								点击上传
							</view> -->
						</view>
					</block>
				</view>
			</view>
		</block>
		<block v-else>
			<view class="additive-none">
				<image src="/static/images/img-9.png"></image>
			</view>
		</block>
		<block v-if="retData.info.nutrition_no_res != 1">
			<view class="quantity-box"
				v-if="(!typeMain && retData.nutrition.length && retData.info.is_scan && retData.info.is_scan_nutrition) || (typeMain &&retData.item_list && retData.item_list.length && retData.nutrition.length && retData.info.is_scan && retData.info.is_scan_nutrition)">
				<view class="title-d">
					<image src="/static/images/ret-2.png" mode="widthFix"></image>
					<view class="i"></view>
					<view class="name">
						营养成分
						<text>{{retData.text_content.text_rll1 || '此项不参与等级计算'}}</text>
					</view>
					<view class="right">
						每100克/毫升
					</view>
				</view>
				<view class="heat_box" v-for="(item,index) in retData.nutrition" :key="index">
					<view class="heat_head">
						<view class="heat_head_left">
							<view class="heat_head_left_icon">
								<image v-if="item.title == '能量'" :src="imgUrl + '15.png'" mode="aspectFill"></image>
								<image v-else-if="item.title == '糖分'" :src="imgUrl + '16.png'" mode="aspectFill">
								</image>
								<image v-else-if="item.title == '蛋白质'" :src="imgUrl + '15-1.png'" mode="aspectFill">
								</image>
								<image v-else-if="item.title == '脂肪'" :src="imgUrl + '15-2.png'" mode="aspectFill">
								</image>
								<image v-else-if="item.title == '碳水化合物'" :src="imgUrl + '15-3.png'" mode="aspectFill">
								</image>
								<image v-else-if="item.title == '钠'" :src="imgUrl + '15-4.png'" mode="aspectFill">
								</image>
								<image v-else :src="imgUrl + '15-5.png'" mode="aspectFill"></image>
							</view>
							<view class="heat_head_left_title">
								{{item.title}}
							</view>
							<view class="heat_head_left_count">
								{{item.num}}{{item.unit}}{{item.num_other?' ( '+item.num_other+' )':''}}
							</view>
						</view>
						<view class="heat_head_right">
							<view :class="['heat_head_right_spot']" :style="'background:'+item.stage[item.level].color">
							</view>
							<view class="heat_head_right_text">
								{{item.stage[item.level].desc}}
							</view>
							<!-- <view class="img1"  :style="item.main?'transform: rotate(270deg);':''">
									<image src="/static/images/my7.png"></image>
								</view> -->
						</view>
					</view>
					<view class="heat_info">
						<view class="heat_info_num_box">
							<view class="heat_info_num" :style="'width:'+(100 / item.stage.length)+'%'"
								v-for="(items,indexs) in item.stage" :key="indexs">
								{{items.data[0]}}
								<text v-if="indexs == item.stage.length - 1"
									style="float: right;">{{items.data[1] || '∞'}}</text>
							</view>
						</view>
						<view class="heat_info_list_box">
							<view class="heat_info_list" :style="'width:'+(100 / item.stage.length)+'%'"
								v-for="(items,indexs) in item.stage" :key="indexs">
								<view class="heat_info_icon">
									<view class="dian" :style="items.num == 0?'left:0;top:0':'left:'+item.width+'%'"
										v-if="indexs == item.level">

									</view>
								</view>
								<view v-if="indexs == item.stage.length - 1" class="heat_info_line"
									:style="'background:'+items.color+';width:'+(100)+'%'"></view>
								<view v-else class="heat_info_line"
									:style="'background:'+items.color+';width:'+(100)+'%'"></view>
							</view>
						</view>

					</view>

				</view>
				<view class="content-ramk" style="color: #000000;" v-if="!retData.info.is_locked">AI识别，若有错漏，48小时内人工修正
				</view>
			</view>
		</block>
		<block v-else>
			<view class="quantity-box">
				<view class="title-d">
					<image src="/static/images/ret-2.png" mode="widthFix"></image>
					<view class="i"></view>
					<view class="name">
						营养成分
						<text>{{retData.text_content.text_rll1 || '此项不参与等级计算'}}</text>
					</view>
					<view class="right">
						每100克/毫升
					</view>
				</view>
				<view class="content-dd" v-if="retData.info.is_scan_nutrition">
					<view class="title-dd">该商品无营养成分</view>
				</view>
			</view>
		</block>

		<view class="pro-box">
			<view class="title-d">
				<image src="/static/images/ret-3.png" mode="widthFix"></image>
				<view class="i"></view>
				<view class="name">
					同类高分产品
				</view>
			</view>
			<view class="list-d" v-if="retData.cate_list.length">
				<block v-for="(item,index) in retData.cate_list" :key="index">
					<view class="list" v-if="index < 6 || (index >=6 && cateListMain)" @click="toResultFun(item)">
						<view class="img">
							<image :src="item.data_image" mode="aspectFill"></image>
						</view>
						<view class="title line1">
							{{item.name}}
						</view>
						<view class="type"
							:class="setGradeFun(item.score)=='B'?'b_color':setGradeFun(item.score)=='C'?'c_color':setGradeFun(item.score)=='D'?'d_color':setGradeFun(item.score)=='B-'?'b1_color':''">
							{{setGradeFun(item.score)}}级
						</view>
					</view>
				</block>

				<view class="img1" @click="cateListMain = !cateListMain" v-if="retData.cate_list > 6">
					<image src="/static/images/24.png" :style="cateListMain?'transform: rotate(180deg);':''"></image>
				</view>
			</view>
			<view class="list-d" v-else>
				<view class="none">
					<image src="/static/images/ret-4.png"></image>
				</view>
			</view>
		</view>
		<view class="status-ddd" v-if="retData.text_content">
			{{retData.text_content.text_dbsm || '剂安安评定的等级，只针对食品添加剂而非产品本身'}}
		</view>

		<view class="expand_box" :style="{'top': 'calc(15rpx + '+(navBarHeight + 'rpx')+')'}" v-if="isExpand">
			<view class="expand_info">
				<!-- 				<view class="expand_text">
					评分方法
				</view> -->
				<!-- 				<view class="expand_line"></view> -->
				<view class="expand_text" @click.stop="setFavoriteFun">
					<image src="/static/images/expand-1.png" v-if="!retData.info.is_favorite"></image>
					<image src="/static/images/expand-2.png" v-else></image>
					{{retData.info.is_favorite?'已收藏':'收藏'}}
				</view>
				<view class="expand_line"></view>
				<view class="expand_text" @click.stop="$u.route('/pages/scans/upload?type=2&code='+retData.info.code)">
					<image src="/static/images/expand-3.png"></image>
					纠错
				</view>
				<view class="expand_line"></view>
				<view class="expand_text" @click.stop="show = true;isExpand=false">
					<image src="/static/images/expand-4.png"></image>
					分享
				</view>
			</view>
		</view>
		<view class="share_box" v-if="isShare">
			<view class="share_left">
				<view class="share_left_title">
					尚未有APP？
				</view>
				<view class="share_left_text">
					点击前往下载
				</view>
			</view>
			<view class="share_right">
				<a class="share_right_btn" :href="retData.download.ios" target="_blank">ios下载</a>
				<a class="share_right_btn" :href="retData.download.android" target="_blank"
					style="margin-left: 20rpx;">安卓下载</a>
			</view>
		</view>
		<u-popup :show="show" @close="close" @open="open" :closeOnClickOverlay="true">
			<view class="partake_box">
				<view class="partake_title">
					分享到
				</view>
				<view class="partake_btn_box">
					<view class="partake_btn" @click="appToShareQQ">
						<view class="partake_btn_icon">
							<image :src="imgUrl + '20.png'" mode="aspectFill"></image>
						</view>
						<view class="partake_btn_text">
							QQ
						</view>
					</view>
					<view class="partake_btn" @click="appToShareWeiXin">
						<view class="partake_btn_icon">
							<image :src="imgUrl + '8.png'" mode="aspectFill"></image>
						</view>
						<view class="partake_btn_text">
							微信
						</view>
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	import {
		getGoodsDetail,
		setFavorite,
		setHistory,
		getGoodsShare
	} from '@/api/api.js';
	export default {
		data() {
			return {
				typeMain: true,
				retData: {
					cate_list: [],
					info: {},
					item_list: [],
					stage_list: [],
					download: {
						android: '',
						ios: ''
					}
				},
				gcode: '',
				show: false,
				kcals: 3,
				kcalss: 1,
				isType: true,
				isExpand: false,
				navBarHeight: '',
				isShare: true, //分享后显示
			};
		},
		onLoad(opition) {
			let that = this;
			uni.getSystemInfo({
				success: function(res) {
					that.navBarHeight = res.windowTop * 2
				}
			});
			if (opition.gcode) {
				this.gcode = opition.gcode
				that.getGoodsShareFun()
			} else {
				return uni.$u.toast('请检查链接是否完整');
			}

		},
		methods: {
			setNutritionFun() {
				if (this.retData.nutrition.length) {
					this.retData.nutrition = this.retData.nutrition.map((item) => {
						let width = 0;
						let num = item.num;
						if (item.judge == 2) {
							num = item.nrv;
						}
						item.stage.forEach((items, indexs) => {
							if (indexs == item.level) {
								if (items.data[1] == '∞') {
									width = 50
								} else {
									let max = parseFloat(items.data[1]) - parseFloat(items.data[0]);
									let min = parseFloat(num) - parseFloat(items.data[0]);
									width = parseInt((min / max) * 100)
								}
							}
						})
						item.width = width;
						item.num = num;
						return item;
					})
					this.$forceUpdate()
				}
			},
			nutritionFun(index) {
				this.retData.nutrition[index].main = !this.retData.nutrition[index].main
				this.$forceUpdate()
			},
			itemListFun(index) {
				this.retData.item_list[index].main = !this.retData.item_list[index].main
				this.$forceUpdate()
			},
			setGradeFun(value) {
				if (value > 50) {
					if (value > 70) {
						if (value > 85) {
							return 'A'
						} else {
							return 'B'
						}
					} else {
						return 'C'
					}
				} else {
					return 'D'
				}
			},
			appToShareWeiXin() {
				const that = this
				uni.share({
					provider: 'weixin', //分享服务提供商（即weixin|qq|sinaweibo）
					scene: "WXSceneSession", //WXSceneSession(分享到聊天界面)、WXSenceTimeline(分享到朋友圈)、WXSceneFavorite(分享到微信收藏)
					type: 1,
					title: "剂安安APP分享",
					summary: "好友邀请你使用剂安安APP,请访问：https://looker.tthweixin.com/h5/#/?code=",
					imageUrl: 'http://www.baidu.com/img/flexible/logo/pc/result.png', //分享图片路径(必须是线上可访问图片：http://xxx、https://xxx等)
					success(res) {
						uni.showToast({
							title: '分享成功',
							icon: 'none'
						})
					},
					fail(err) {
						uni.showToast({
							title: '分享失败',
							icon: 'none'
						})
					}
				});
			},
			appToShareQQ() {
				const that = this
				uni.share({
					provider: 'qq', //分享服务提供商（即weixin|qq|sinaweibo）
					type: 1,
					title: "剂安安APP分享",
					summary: "好友邀请你使用剂安安APPr,请访问：https://looker.tthweixin.com/h5/#/?code=" + that.userinfo
						.invitation_code,
					imageUrl: 'http://www.baidu.com/img/flexible/logo/pc/result.png', //分享图片路径(必须是线上可访问图片：http://xxx、https://xxx等)
					success(res) {
						uni.showToast({
							title: '分享成功',
							icon: 'none'
						})
					},
					fail(err) {
						uni.showToast({
							title: '分享失败',
							icon: 'none'
						})
					}
				});
			},
			setHistoryFun() {
				setHistory({
					gcode: this.retData.info.code
				}).then((resOne) => {

				}).catch((e) => {
					uni.$u.toast(typeof e === 'string' ? e : '请检查网络连接');
				})
			},
			setFavoriteFun() {
				if (this.retData.info.is_favorite) {
					this.$u.route('/pages/scans/Collection')
					this.isExpand = false
				} else {
					uni.showLoading({
						title: '提交中'
					})
					setFavorite({
						gcode: this.retData.info.code,
						status: 0
					}).then((res) => {
						uni.hideLoading();
						uni.$u.toast('收藏成功');
						this.retData.info.is_favorite = true
						uni.setStorageSync('RetData', this.retData)
						this.isExpand = false
					}).catch((e) => {
						uni.hideLoading();
						uni.$u.toast(typeof e === 'string' ? e : '请检查网络连接');
					})
				}

			},
			toResultFun(item) {
				const that = this
				console.log(item)
				if (item.code == this.retData.info.code) {
					return uni.$u.toast('点击商品与当前相同');
				}
				this.getGoodsShareFun(item.code)
			},
			toInfoFun(item) {

				uni.navigateTo({
					url: '/pages/scans/details?id=' + item.id
				})
			},
			getGoodsShareFun(gcode) {
				const that = this
				uni.showLoading({
					title: '获取中'
				})
				getGoodsShare({
					gcode: gcode || this.gcode,
					souce: true
				}).then((res) => {
					uni.hideLoading();
					const {
						data
					} = res
					let calorie_num = parseFloat(data.info.calorie_num)
					let sugar_num = parseFloat(data.info.sugar_num)
					data.stage_list.calorie.forEach((item, index) => {
						if (calorie_num > item) {
							if (index == data.stage_list.calorie.length - 1 || calorie_num <= data
								.stage_list.calorie[index + 1]) {
								console.log(item)
								that.kcals = index + 1
							}
						}
					})
					data.stage_list.sugar.forEach((item, index) => {
						if (sugar_num > item) {
							if (index == data.stage_list.sugar.length - 1 || sugar_num <= data.stage_list
								.sugar[index + 1]) {
								that.kcalss = index + 1
							}
						}
					})
					that.retData = data
					that.typeMain = that.retData.info.is_scan && that.retData.item_list.length == 0 ? false : true
					that.kcals = that.retData.info.calorie_index || 1
					that.kcalss = that.retData.info.sugar_index || 1
					that.setNutritionFun();
				}).catch((e) => {
					uni.hideLoading();
					uni.$u.toast(typeof e === 'string' ? e : '请检查网络连接');
				})
			},
			onNavigationBarButtonTap(e) {
				this.isExpand = !this.isExpand
			},
			close() {
				this.show = false;
			},
			open() {
				// console.log('open');
			},
		}
	}
</script>

<style lang="scss" scoped>
	view {
		box-sizing: border-box;
	}

	.line1 {
		white-space: nowrap;
		overflow: hidden; //文本超出隐藏
		text-overflow: ellipsis; //文本超出省略号替代
	}

	.d_color {
		color: #ee3a3a !important;
	}

	.d_bg {
		background: #ee3a3a !important;
	}

	.d_border {
		border: 1rpx solid #ee3a3a !important;
	}

	.c_color {
		color: #fec817 !important;
	}

	.c_bg {
		background: #fec817 !important;
	}

	.c_border {
		border: 1rpx solid #fec817 !important;
	}

	.b1_color {
		color: #6aa300 !important;
	}

	.b1_bg {
		background: #6aa300 !important;
	}

	.b1_border {
		border: 1rpx solid #6aa300 !important;
	}

	.b_color {
		color: #00cc70 !important;
	}

	.b_bg {
		background: #00cc70 !important;
	}

	.b_border {
		border: 1rpx solid #00cc70 !important;
	}

	.a_color {
		color: #30c285 !important;
	}

	.a_bg {
		background: #30c285 !important;
	}

	.a_border {
		border: 1rpx solid #30c285 !important;
	}

	.wrap {
		padding: 30rpx 0 73rpx;
		background-color: #84a1db;
		min-height: 100vh;
		overflow: hidden;
		box-sizing: border-box;

		.head_box {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 20rpx 15rpx;
			width: 710rpx;
			box-sizing: border-box;
			background-color: white;
			border-radius: 20rpx;
			margin: 0 auto;

			.head_left {
				display: flex;
				align-items: center;

				.head_left_icon {
					width: 180rpx;
					height: 180rpx;

					image {
						width: 100%;
						height: 100%;
					}
				}

				.head_left_info {
					margin-left: 16rpx;
					width: 290rpx;

					.head_left_info_title {
						font-size: 30rpx;
						font-weight: bold;
						color: #434242;
					}

					.head_left_info_text {
						margin-top: 20rpx;
						font-size: 24rpx;
						color: #afafaf;
					}

					.head_left_info_count {
						margin-top: 22rpx;
						font-size: 25rpx;
						color: #afafaf;
					}
				}
			}

			.head_right {
				display: flex;
				align-items: center;
				flex-direction: column;
				width: 300rpx;
				text-align: left;

				.head_right_text {
					font-size: 24rpx;
					font-weight: 400;
					color: #30c285;
					text-align: center;
					padding: 5rpx;
					border: none !important;

					border-radius: 8rpx;
					margin: 20rpx 0 0 0;
				}

				.head_right_rank {
					margin-top: 10rpx;
					display: flex;
					align-items: center;
					justify-content: center;

					.head_right_rank_spot {
						width: 40rpx;
						height: 40rpx;
						background: #30c285;
						border-radius: 50%;
						line-height: 40rpx;
						color: white;
						font-size: 24rpx;
						font-weight: 700;
						text-align: center;
						position: relative;
						margin-top: 24rpx;

						image {
							width: 24rpx;
							height: 29rpx;
							position: absolute;
							left: calc(50% - 12rpx);
							top: calc(50% - 14rpx);
						}
					}

					.head_right_rank_text {
						margin-left: 10rpx;
						font-size: 70rpx;
						font-weight: 700;
						color: #30c285;
					}
				}
			}
		}

		.additive-box {
			width: 710rpx;
			box-sizing: border-box;
			background-color: white;
			border-radius: 20rpx;
			margin: 20rpx auto;
			padding-bottom: 6rpx;

			.title-d {
				width: 100%;
				height: 80rpx;
				position: relative;
				padding: 0 40rpx;
				line-height: 80rpx;
				color: white;
				font-size: 34rpx;
				font-weight: 700;
				overflow: hidden;

				.i {
					display: inline-block;
					vertical-align: top;
					width: 6rpx;
					height: 32rpx;
					background-color: #00b9ff;
					margin: 26rpx 20rpx 0 0;
					position: relative;
					z-index: 1;
				}

				image {
					width: 100%;
					min-height: 100%;
					position: absolute;
					left: 0;
					top: 0;
					z-index: 0;
				}

				.name {
					position: relative;
					z-index: 1;
					display: inline-block;
					vertical-align: top;
				}
			}

			.list-d {
				padding: 20rpx;
				overflow: hidden;
				color: #434242;
				font-size: 34rpx;
				font-weight: 400;
				line-height: 70rpx;

				.list {
					width: 100%;
					overflow: hidden;

					.tit {
						margin-top: 10rpx;

						.i {
							width: 24rpx;
							height: 24rpx;
							border-radius: 50%;
							background-color: #30c285;
							display: inline-block;
							vertical-align: top;
							margin: 22rpx 10rpx 0 10rpx;
						}

						.span {
							display: inline-block;
							vertical-align: top;
							line-height: 40rpx;
							padding: 0 14rpx;
							border: solid 1rpx #30c285;
							border-radius: 8rpx;
							margin: 16rpx 0 0 10rpx;
							color: #30c285;
							font-size: 24rpx;
							font-weight: 700;
						}
					}

					.li-d {
						width: 100%;
						padding: 0rpx 20rpx;
						overflow: hidden;
						border-radius: 14rpx;
						margin-top: 10rpx;
						background: linear-gradient(to right, #84a1db40, #6e9eff05);

						.li {
							width: 100%;
							overflow: hidden;
							padding: 0 100rpx 0 40rpx;
							position: relative;
							font-size: 28rpx;
							font-weight: 700;
							line-height: 50rpx;
							margin: 14rpx 0;

							.i {
								width: 12rpx;
								height: 12rpx;
								border-radius: 50%;
								background-color: #30c285;
								position: absolute;
								left: 6rpx;
								top: 20rpx;
							}

							.type {
								font-size: 22rpx;
								font-weight: 400;
								color: #8f8f8f;
								line-height: 30rpx;

								text {
									margin: 14rpx 10rpx 0 0;
									border: solid 1rpx #8f8f8f;
									border-radius: 8rpx;
									padding: 8rpx;
									display: inline-block;
									vertical-align: top;
									word-break: break-all;
								}
							}

							.img {
								width: 38rpx;
								height: 38rpx;
								position: absolute;
								right: 10rpx;
								top: 10rpx;

								image {
									width: 100%;
									height: 100%;
									display: inline-block;
									vertical-align: top;
								}
							}

							.img1 {
								width: 14rpx;
								height: 26rpx;
								position: absolute;
								right: 20rpx;
								top: 10rpx;
								transform: rotate(90deg);

								image {
									width: 100%;
									height: 100%;
									display: inline-block;
									vertical-align: top;
								}
							}
						}
					}
				}
			}

			.content-ramk {
				color: #ababab;
				text-align: center;
				font-size: 24rpx;
				line-height: 40rpx;
				margin-top: 20rpx;
			}
		}

		.quantity-box {
			width: 710rpx;
			box-sizing: border-box;
			background-color: #ffffff;
			border-radius: 20rpx;
			margin: 20rpx auto;
			padding-bottom: 40rpx;

			.title-d {
				width: 100%;
				height: 80rpx;
				position: relative;
				padding: 0 40rpx;
				line-height: 80rpx;
				color: white;
				font-size: 34rpx;
				font-weight: 700;
				overflow: hidden;

				.i {
					display: inline-block;
					vertical-align: top;
					width: 6rpx;
					height: 32rpx;
					background-color: #00b9ff;
					margin: 26rpx 20rpx 0 0;
					position: relative;
					z-index: 1;
				}

				image {
					width: 100%;
					min-height: 100%;
					position: absolute;
					left: 0;
					top: 0;
					z-index: 0;
				}

				.name {
					position: relative;
					z-index: 1;
					display: inline-block;
					vertical-align: top;

					text {
						font-size: 24rpx;
						line-height: 46rpx;
						font-weight: 400;
						padding: 0 20rpx;
						border-radius: 30rpx;
						background-color: #01d8cb;
						margin: 0 20rpx;
						display: inline-block;
					}
				}

				.right {
					position: absolute;
					right: 30rpx;
					top: 0;
					font-size: 24rpx;
					font-weight: 400;
				}
			}

			.heat_box {
				padding: 20rpx 0 10rpx 0;
				border-bottom: 1rpx solid #cccccc50;

				.heat_head {
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 0 40rpx 0 24rpx;

					.heat_head_left {
						display: flex;
						align-items: center;

						.heat_head_left_icon {
							width: 41rpx;
							height: 41rpx;

							image {
								width: 100%;
								height: 100%;
							}
						}

						.heat_head_left_title {
							margin-left: 10rpx;
							font-size: 28rpx;
							font-weight: bold;
							color: #434242;
						}

						.heat_head_left_count {
							margin-left: 18rpx;
							font-size: 24rpx;
							color: #737373;
						}
					}

					.heat_head_right {
						display: flex;
						align-items: center;

						.heat_head_right_spot {
							width: 24rpx;
							height: 24rpx;
							background: #fdc817;
							border-radius: 50%;
						}

						.heat_head_right_text {
							margin-left: 10rpx;
							font-size: 24rpx;
							color: #303030;
							font-weight: bold;
						}

						.img1 {
							width: 14rpx;
							height: 26rpx;
							transform: rotate(90deg);
							margin: 0 10rpx 0 20rpx;

							image {
								width: 100%;
								height: 100%;
								display: inline-block;
								vertical-align: top;
							}
						}
					}
				}

				.heat_info {
					width: 700rpx;

					margin-top: 20rpx;
					padding-bottom: 12rpx;

					.heat_info_list_box {
						display: flex;
						align-items: center;
						justify-content: space-between;
						padding: 0 50rpx;

						.heat_info_list {
							display: flex;
							flex-direction: column;
							align-items: center;
							position: relative;

							.heat_info_icon {

								// position: relative;
								// width: 20rpx;
								// height: 20rpx;
								.dian {
									position: absolute;
									width: 20rpx;
									height: 20rpx;
									border: solid 2px #000000;
									top: -4rpx;
									z-index: 9;
									border-radius: 50%;
									background: white;
								}
							}

							.heat_info_line {
								margin-top: 5rpx;
								width: 144rpx;
								height: 6rpx;
								background: linear-gradient(to right, #0e7849, rgb(31, 222, 60));
								// border-radius: 6rpx;
							}
						}
					}

					.heat_info_num_box {
						margin-top: 10rpx;
						display: flex;
						align-items: center;
						justify-content: space-between;
						padding: 0 50rpx 0 50rpx;
						position: relative;

						.heat_info_num {
							font-size: 22rpx;
							color: #737373;
							overflow: hidden;
						}
					}
				}

				.tisp_text {
					padding: 30rpx 26rpx 0 0;
					opacity: 0.68;
					font-size: 24rpx;
					text-align: right;
					color: #a0a0a0;
				}
			}

			.content-ramk {
				color: #ababab;
				text-align: center;
				font-size: 24rpx;
				line-height: 40rpx;
				margin-top: 30rpx;
			}
		}

		.pro-box {
			width: 710rpx;
			box-sizing: border-box;
			background-color: #ffffff90;
			border-radius: 20rpx;
			margin: 30rpx auto;
			padding-bottom: 20rpx;

			.title-d {
				width: 100%;
				height: 80rpx;
				position: relative;
				padding: 0 40rpx;
				line-height: 80rpx;
				color: white;
				font-size: 34rpx;
				font-weight: 700;
				overflow: hidden;

				.i {
					display: inline-block;
					vertical-align: top;
					width: 6rpx;
					height: 32rpx;
					background-color: #00b9ff;
					margin: 26rpx 20rpx 0 0;
					position: relative;
					z-index: 1;
				}

				image {
					width: 100%;
					min-height: 100%;
					position: absolute;
					left: 0;
					top: 0;
					z-index: 0;
				}

				.name {
					position: relative;
					z-index: 1;
					display: inline-block;
					vertical-align: top;

					text {
						font-size: 24rpx;
						line-height: 46rpx;
						font-weight: 400;
						padding: 0 20rpx;
						border-radius: 30rpx;
						background-color: #01d8cb;
						margin: 0 20rpx;
						display: inline-block;
					}
				}

				.right {
					position: absolute;
					right: 30rpx;
					top: 0;
					font-size: 24rpx;
					font-weight: 400;
				}
			}

			.list-d {
				width: 96%;
				text-align: left;
				font-size: 28rpx;
				font-weight: 400;
				line-height: 50rpx;
				overflow: auto;
				color: #434242;
				margin-left: 2%;
				margin-top: 20rpx;

				.img1 {
					width: 46rpx;
					height: 18rpx;
					margin: 20rpx auto;

					image {
						width: 100%;
						height: 100%;
						display: inline-block;
						vertical-align: top;
					}
				}

				.list {
					width: 30%;
					display: inline-block;
					vertical-align: top;
					margin: 1.5% 1.5% 0 1.5%;
					overflow: hidden;
					margin-top: 10rpx;
					text-align: center;

					.img {
						width: 190rpx;
						height: 190rpx;
						margin: 0 auto;
						border-radius: 20rpx;
						background-color: white;
						overflow: hidden;
						margin-bottom: 10rpx;

						image {
							width: 100%;
							height: 100%;
							display: inline-block;
							vertical-align: top;
						}
					}

					.type {
						color: #22c58a;
					}
				}

				.none {
					width: 312rpx;
					height: 260rpx;
					margin: 50rpx auto;

					image {
						width: 100%;
						height: 100%;
						display: inline-block;
						vertical-align: top;
					}
				}
			}
		}

		.status-ddd {
			text-align: center;
			font-size: 28rpx;
			font-weight: 400;
			line-height: 50rpx;
			color: white;
			margin: 30rpx 0 0 0;
			width: 100%;
			opacity: 0.9;
			padding: 0 10rpx;
			box-sizing: border-box;
		}

		.additive-none {
			width: 710rpx;
			box-sizing: border-box;
			background-color: #ffffff;
			border-radius: 20rpx;
			margin: 30rpx auto;
			padding: 20rpx 0 50rpx 0;
			text-align: center;
			color: #999999;
			line-height: 100rpx;
			font-size: 30rpx;

			image {
				width: 588rpx;
				height: 600rpx;
				display: inline-block;
				vertical-align: top;
			}
		}
	}

	.back_a {
		background: #0e7849 !important;
	}

	.back_b {
		background: #1edf38 !important;
	}

	.back_c {
		background: #fdc817 !important;
	}

	.back_d {
		background: #ee3a3a !important;
	}

	.expand_box {
		position: fixed;
		right: 48rpx;
		width: 232rpx;
		height: 301rpx;
		background: #ffffff;
		box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(0, 0, 0, 0.16);

		.expand_info {
			width: 232rpx;
			height: 301rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;

			.expand_text {
				font-size: 28rpx;
				text-align: left;
				color: #434242;
				width: 100%;

				image {
					width: 32rpx;
					height: 32rpx;
					display: inline-block;
					vertical-align: top;
					margin: 0 10rpx 0 50rpx;
				}
			}

			.expand_line {
				margin: 30rpx 0;
				width: 178rpx;
				height: 2rpx;
				background: #ededed;
			}
		}
	}

	.share_box {
		z-index: 9999;
		position: fixed;
		bottom: 0;
		left: 0;
		display: flex;
		align-items: center;
		padding: 0 36rpx 0 40rpx;
		width: 750rpx;
		height: 137rpx;
		background: rgba(0, 0, 0, 0.72);

		.share_left {
			margin-right: 80rpx;

			.share_left_title {
				font-size: 34rpx;
				font-weight: bold;
				color: #ffffff;
			}

			.share_left_text {
				margin-top: 5rpx;
				font-size: 24rpx;
				color: #a7a7a7;
			}
		}

		.share_right {
			display: flex;
			align-items: center;

			.share_right_btn {
				width: 180rpx;
				height: 85rpx;
				background: #2767e6;
				border-radius: 43rpx;
				box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0, 185, 255, 0.2);
				font-size: 30rpx;
				font-weight: bold;
				line-height: 85rpx;
				text-align: center;
				color: #ffffff;
			}
		}
	}

	.partake_box {
		width: 750rpx;
		height: 400rpx;
		background: #ffffff;
		padding-top: 63rpx;

		.partake_title {
			font-size: 34rpx;
			font-weight: bold;
			text-align: center;
			color: #434242;
		}

		.partake_btn_box {
			margin-top: 50rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 160rpx;

			.partake_btn {
				display: flex;
				align-items: center;
				flex-direction: column;
				justify-content: center;

				.partake_btn_icon {
					width: 94rpx;
					height: 94rpx;

					image {
						width: 100%;
						height: 100%;
					}
				}

				.partake_btn_text {
					margin-top: 24rpx;
					font-size: 28rpx;
					text-align: center;
					color: #5b5b5b;
				}
			}
		}
	}
</style>